<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibQQt: QQtWidget Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibQQt
   &#160;<span id="projectnumber">v3.1</span>
   </div>
   <div id="projectbrief">开源、跨平台Qt应用程序框架中间件</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="class_q_qt_widget-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">QQtWidget Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for QQtWidget:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_q_qt_widget.png" usemap="#QQtWidget_map" alt=""/>
  <map id="QQtWidget_map" name="QQtWidget_map">
<area href="class_main_form.html" alt="MainForm" shape="rect" coords="148,112,286,136"/>
<area href="class_q_qt_gif_widget.html" alt="QQtGifWidget" shape="rect" coords="148,168,286,192"/>
<area href="class_q_qt_o_s_d_form.html" alt="QQtOSDForm" shape="rect" coords="148,224,286,248"/>
<area href="class_q_qt_osd_form.html" alt="QQtOsdForm" shape="rect" coords="148,280,286,304"/>
<area href="class_q_qt_o_s_d_frame.html" alt="QQtOSDFrame" shape="rect" coords="148,336,286,360"/>
<area href="class_q_qt_o_s_d_widget.html" alt="QQtOSDWidget" shape="rect" coords="148,392,286,416"/>
<area href="class_q_qt_title_bar.html" alt="QQtTitleBar" shape="rect" coords="148,448,286,472"/>
<area href="class_q_qt_virtual_click_widget.html" alt="QQtVirtualClickWidget" shape="rect" coords="148,504,286,528"/>
<area href="class_q_qt_wifi_d_b_widget.html" alt="QQtWifiDBWidget" shape="rect" coords="148,560,286,584"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a5a6d58f533c2f43c854f47f71d086cce"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_qt_widget.html#a5a6d58f533c2f43c854f47f71d086cce">ImageStyle</a> { <br />
&#160;&#160;<a class="el" href="class_q_qt_widget.html#a5a6d58f533c2f43c854f47f71d086ccea67fe3a192a16e09bb76e0d6ec23524d7">QQTCENTER</a>, 
<a class="el" href="class_q_qt_widget.html#a5a6d58f533c2f43c854f47f71d086cceaf3957f90f03e90dedfe35e5debfb1b29">QQTTILEDWIDTH</a>, 
<b>QQTTILEDHEIGHT</b>, 
<b>QQTTILED</b>, 
<br />
&#160;&#160;<a class="el" href="class_q_qt_widget.html#a5a6d58f533c2f43c854f47f71d086cceabbda1cf537f85a1d4ee66863907732d6">QQTZOOMWIDTH</a>, 
<b>QQTZOOMHEIGHT</b>, 
<b>QQTZOOM</b>, 
<a class="el" href="class_q_qt_widget.html#a5a6d58f533c2f43c854f47f71d086cceae6b0a3f96c2c8a62f909690d00e2853b">QQTZOOMWIDTH_KEEPASPECTRATIO</a>, 
<br />
&#160;&#160;<b>QQTZOOMHEIGHT_KEEPASPECTRATIO</b>, 
<b>QQTZOOM_KEEPASPECTRATIO</b>, 
<b>QQTIMAGESTYLEMAX</b>
<br />
 }</td></tr>
<tr class="separator:a5a6d58f533c2f43c854f47f71d086cce"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a28805216d8877c09c247cc09cd3aa654"><td class="memItemLeft" align="right" valign="top"><a id="a28805216d8877c09c247cc09cd3aa654"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>QQtWidget</b> (QWidget *parent=0)</td></tr>
<tr class="separator:a28805216d8877c09c247cc09cd3aa654"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a50bdce66c383f4f708d4ea2588f155"><td class="memItemLeft" align="right" valign="top"><a id="a8a50bdce66c383f4f708d4ea2588f155"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setImageStyle</b> (<a class="el" href="class_q_qt_widget.html#a5a6d58f533c2f43c854f47f71d086cce">ImageStyle</a> style=<a class="el" href="class_q_qt_widget.html#a5a6d58f533c2f43c854f47f71d086ccea67fe3a192a16e09bb76e0d6ec23524d7">QQTCENTER</a>)</td></tr>
<tr class="separator:a8a50bdce66c383f4f708d4ea2588f155"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7139ad8c4e8cdf6cb17493e8c93f5afb"><td class="memItemLeft" align="right" valign="top"><a id="a7139ad8c4e8cdf6cb17493e8c93f5afb"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setPixmap</b> (const QString &amp;pic=QString())</td></tr>
<tr class="separator:a7139ad8c4e8cdf6cb17493e8c93f5afb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d0b612a44166525f4f1c691a25eab05"><td class="memItemLeft" align="right" valign="top"><a id="a9d0b612a44166525f4f1c691a25eab05"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setPixmap</b> (const QPixmap &amp;pixmap)</td></tr>
<tr class="separator:a9d0b612a44166525f4f1c691a25eab05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89e4ffac8d1a8cede80746c947c14858"><td class="memItemLeft" align="right" valign="top"><a id="a89e4ffac8d1a8cede80746c947c14858"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setPixmap</b> (const QImage &amp;image)</td></tr>
<tr class="separator:a89e4ffac8d1a8cede80746c947c14858"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a6ba32570495e7f880be841557cfea6ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_qt_widget.html#a6ba32570495e7f880be841557cfea6ea">paintEvent</a> (QPaintEvent *) override</td></tr>
<tr class="separator:a6ba32570495e7f880be841557cfea6ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a5a6d58f533c2f43c854f47f71d086cce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a6d58f533c2f43c854f47f71d086cce">&#9670;&nbsp;</a></span>ImageStyle</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="class_q_qt_widget.html#a5a6d58f533c2f43c854f47f71d086cce">QQtWidget::ImageStyle</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a5a6d58f533c2f43c854f47f71d086ccea67fe3a192a16e09bb76e0d6ec23524d7"></a>QQTCENTER&#160;</td><td class="fielddoc"><p>整个居中,全面缩放显示 </p>
</td></tr>
<tr><td class="fieldname"><a id="a5a6d58f533c2f43c854f47f71d086cceaf3957f90f03e90dedfe35e5debfb1b29"></a>QQTTILEDWIDTH&#160;</td><td class="fielddoc"><p>切 从左上 会产生label的效果，左右按照rect长，但是不缩放形状 </p>
</td></tr>
<tr><td class="fieldname"><a id="a5a6d58f533c2f43c854f47f71d086cceabbda1cf537f85a1d4ee66863907732d6"></a>QQTZOOMWIDTH&#160;</td><td class="fielddoc"><p>缩放 忽略长宽比 </p>
</td></tr>
<tr><td class="fieldname"><a id="a5a6d58f533c2f43c854f47f71d086cceae6b0a3f96c2c8a62f909690d00e2853b"></a>QQTZOOMWIDTH_KEEPASPECTRATIO&#160;</td><td class="fielddoc"><p>缩放 保持长宽比 </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a6ba32570495e7f880be841557cfea6ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ba32570495e7f880be841557cfea6ea">&#9670;&nbsp;</a></span>paintEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void QQtWidget::paintEvent </td>
          <td>(</td>
          <td class="paramtype">QPaintEvent *&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>要达到居中的目标，QImage需要做的size判断很繁复，这里使用QIcon做一些中间转换的后续转换，可以很容易的达到绘制合理大小的pixmap的目的。 source: pixmap file image QImage 输入、输出两侧是pixmap 借助(+QIcon) QIcon 输入、输出两侧也是pixmap dest: 所需要的、合理大小的pixmap</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>R:/Develop/a0-develop/LibQQt/src/widgets/<a class="el" href="qqtwidget_8h_source.html">qqtwidget.h</a></li>
<li>R:/Develop/a0-develop/LibQQt/src/widgets/qqtwidget.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
